﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/CompanyConsole.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadHolder" runat="server">
<script type="text/javascript">
    $(function () { 
        myAccordion.showThisHideOpen(contents[1]);
    });
    function DeleteItem(sender, fid) {
        if (confirm('是否确认删除此资源')) {
            $.get('/DownloadDeleteItem', { 'fid': fid }, function (result) {
                if (result == '1') {
                    $(sender).parent().parent().remove();
                }
            });
        }
    }
</script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="BodyHolder" runat="server">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="17" height="29" valign="top" background="/Content/images/Console/mail_leftbg.gif">
                <img src="/Content/images/Console/left-top-right.gif" width="17" height="29" />
            </td>
            <td width="935" height="29" valign="top" background="/Content/images/Console/content-bg.gif">
                <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg"
                    id="table2">
                    <tr>
                        <td height="31">
                            <div class="titlebt">
                                企业动态</div>
                        </td>
                    </tr>
                </table>
            </td>
            <td width="16" valign="top" background="/Content/images/Console/mail_rightbg.gif">
                <img src="/Content/images/Console/nav-right-bg.gif" width="16" height="29" />
            </td>
        </tr>
        <tr>
            <td height="71" valign="middle" background="/Content/images/Console/mail_leftbg.gif">
                &nbsp;
            </td>
            <td valign="top" bgcolor="#F7F8F9">
                <table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="13" valign="top">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="left_txt" style="border-bottom:1px solid #aaa;">
                                        当前位置：企业动态管理
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table style="margin-top:10px;" width="100%" height="55" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td width="10%" height="55" valign="middle">
                                                    <img src="/Content/images/Console/title.gif" width="54" height="55">
                                                </td>
                                                <td width="90%" valign="top">
                                                    <span class="left_txt2">在这里，您可以编辑您企业的最新动态<span
                                                        class="left_txt2">！</span><br/>
                                                    <span class="left_txt2">通常</span><span class="left_txt3">您应该在这里发布一些关于您企业的重大事件或某些新产品，新业务的开通</span><span
                                                        class="left_txt2">等<span class="left_txt2">。
                                                        </span>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table style="margin-top:10px;" width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
                                            <tr>
                                                <td class="left_bt2" style="width:35%;">
                                                    &nbsp;&nbsp;&nbsp;&nbsp;企业动态管理
                                                    
                                                </td>
                                                <td>
                                                 <td>
                                                   &nbsp;
                                                </td>
                                                </td>
                                                <td align="right" style="width:35%;">
                                                    <a href="/DownloadAddItem" style="margin-right:30px;">
                                                    <img name="add" src="/Content/images/edit_add.png" style="border:none; margin-top:5px;"/>
                                                    添加资源
                                                    </a>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>  
                                    <div id="newsbox">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr height="30"  bgcolor="#f2f2f2">
                                            <td width="10%" align="center">&nbsp;</td>
                                            <td width="22%" align="center">发布时间</td>
                                            <td width="43%" align="center">标题</td>
                                            <td width="5%" align="center">点击量</td>
                                            <td width="25%" align="center">操作</td>
                                          <%--  <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">
                                                主题图片：
                                            </td>
                                            <td width="80%" colspan="3" height="30" bgcolor="#f2f2f2" class="left_txt" style="">
                                              <input type="file" name="AboutUsImg" style="width:284px;" />
                                              <span class="left_txt">一张最能代表您公司的主题图片(请选择jpg、png格式图片)</span>
                                            </td>--%>
                                        </tr>
                                        <%var list = ViewData["Data"] as List<DefaultDataPack>;
                                          int i = 1;
                                          foreach (var item in list)
                                          { %>
                                        <tr height="30">
                                            <td align="center"><%:i++ %></td>
                                            <td align="center"><%:item.DATE%></td>
                                            <td align="center"><a target="_blank" href="/downloadfile?from=/download&fid=<%:item.ID %>"><%:item.TITLE %></a></td>
                                            <td align="center"><%:item.HIT %></td>
                                            <td align="center">
                                                <a target="_blank" href="/downloadfile?from=/download&fid=<%:item.ID %>">下载查看</a>
                                                <a href="javascript:;" onclick="DeleteItem(this,'<%:item.ID %>')">删除</a>
                                            </td>
                                        </tr>
                                        <%} %>
                                        <tr height="30">
                                            <td colspan="4" align="left" style="padding-left:30px;">
                                                <div style="float:left;">
                                                    <a href="?page=0"><img style="border:none;" src="/Content/images/pagination_first.gif" /></a>
                                                    <a href="?page=<%:list[0].PREVIOUSPAGE %>"><img style="border:none;" src="/Content/images/pagination_prev.gif" /></a>
                                                </div>
                                                <div style="padding-top:1px; float:left;">当前第<%:list[0].CURRENTPAGE %>/<%:list[0].PAGECOUNT %>页</div> 
                                                <div>
                                                     <a href="?page=<%:list[0].NEXTPAGE %>"><img style="border:none;" src="/Content/images/pagination_next.gif" /></a>
                                                    <a href="?page=<%:list[0].LASTPAGE %>"><img style="border:none;" src="/Content/images/pagination_last.gif" /></a>

                                                </div>
                                            </td>
                                            <td height="17" colspan="3" align="center">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                    </div>
                                    </td>
                                </tr>
                            </table>
                           
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td valign="middle" background="/Content/images/Console/mail_leftbg.gif">
                <img src="/Content/images/Console/buttom_left2.gif" width="17" height="17" />
            </td>
            <td height="17" valign="top" background="/Content/images/Console/buttom_bgs.gif">
                <img src="/Content/images/Console/buttom_bgs.gif" width="17" height="17" />
            </td>
            <td background="/Content/images/Console/mail_rightbg.gif">
                <img src="/Content/images/Console/buttom_right2.gif" width="16" height="17" />
            </td>
        </tr>
    </table>
</asp:Content>
